﻿using BO.News;
using CBL;
using System;
using Utilities.Entities;

namespace GUI.Extensions
{
    public static class RequestExtensions
    {
        public static CategoryObject Category
        {
            get
            {
                var catUrl = CatUrl;
                return string.IsNullOrEmpty(catUrl) ? null : NewsBO.GetInstance().GetCategoryDetail(catUrl);
            }
        }

        public static CategoryObject ParentCategory
        {
            get
            {
                var catUrl = ParentCatUrl;
                return string.IsNullOrEmpty(catUrl) ? null : NewsBO.GetInstance().GetCategoryDetail(catUrl);
            }

        }

        public static TagObject Tag
        {
            get
            {
                var tagId = TagId;
                return tagId > 0 ? NewsBO.GetInstance().GetTagDetail(tagId) : null;
            }
        }

        [Obsolete]
        public static string Keywords
        {
            get { return RequestExtensionProperties.Keywords; }

        }

        [Obsolete]
        public static DateTime Date
        {
            get { return RequestExtensionProperties.Date; }
        }

        [Obsolete]
        public static int PageIndex
        {
            get { return RequestExtensionProperties.PageIndex; }

        }

        [Obsolete]
        public static int PageSize
        {

            get { return RequestExtensionProperties.PageSize; }

        }

        [Obsolete]
        public static bool ContainsPageIndex
        {
            get { return RequestExtensionProperties.ContainsPageIndex; }
        }

        [Obsolete]
        public static bool IsAjax
        {
            get { return RequestExtensionProperties.IsAjax; }
        }

        [Obsolete]
        public static long NewsId
        {
            get { return RequestExtensionProperties.NewsId; }
        }

        [Obsolete]
        public static int TagId
        {
            get { return RequestExtensionProperties.TagId; }
        }

        [Obsolete]
        public static string TagUrl
        {
            get { return RequestExtensionProperties.TagUrl; }
        }

        [Obsolete]
        public static int CatId
        {

            get { return RequestExtensionProperties.CatId; }

        }

        [Obsolete]
        public static string CatUrl
        {
            get { return RequestExtensionProperties.CatUrl; }
        }

        [Obsolete]
        public static string ParentCatUrl
        {

            get { return RequestExtensionProperties.ParentCatUrl; }

        }

        [Obsolete]
        public static string Url
        {
            get { return RequestExtensionProperties.Url; }

        }

        [Obsolete]
        public static int Day
        {
            get { return RequestExtensionProperties.Day; }
        }

        [Obsolete]
        public static int Month
        {

            get { return RequestExtensionProperties.Month; }


        }

        [Obsolete]
        public static int Year
        {

            get { return RequestExtensionProperties.Year; }

        }

        [Obsolete]
        public static int ZoneId
        {
            get { return RequestExtensionProperties.ZoneId; }
        }

        [Obsolete]
        public static int VideoId
        {
            get { return RequestExtensionProperties.VideoId; }
        }

        [Obsolete]
        public static int VideoZoneId
        {
            get { return RequestExtensionProperties.VideoZoneId; }
        }

        [Obsolete]
        public static int ImageWidth
        {
            get { return RequestExtensionProperties.ImageWidth; }
        }

        [Obsolete]
        public static int ImageHeight
        {
            get { return RequestExtensionProperties.ImageHeight; }
        }

        [Obsolete]
        public static int Top
        {
            get { return RequestExtensionProperties.Top; }
        }

        [Obsolete]
        public static int Type
        {
            get { return RequestExtensionProperties.Type; }
        }

        [Obsolete]
        public static int VoteId
        {
            get { return RequestExtensionProperties.VoteId; }

        }

        [Obsolete]
        public static string VoteItemIDs
        {
            get { return RequestExtensionProperties.VoteItemIDs; }
        }

        [Obsolete]
        public static bool IsHomePage
        {
            get { return RequestExtensionProperties.IsHomePage; }
        }
    }
}